<template>
		<div>
      <p>当天时间：{{today1}}({{today}})</p>
      <p>农历：{{nl}}</p>
      <p>星期{{week.zw}}({{week.sz}})</p>
      <p>本月：{{curMonth.firstDay}} ~ {{curMonth.lastDay}}</p>
      <p>本周：{{curWeek.firstDay}} ~ {{curWeek.lastDay}}</p>
      <p>本周一至今：<span v-for="day in curWeekEveryDay">{{day}}，</span></p>
      <p>7天前：{{lastweek}}</p>

<!--      当天时间：2018年12月04日(2018-12-04)

      农历：戊戌年 十月廿七

      星期二(2)

      本月：2018-12-01 ~ 2018-12-31

      本周：2018-12-03 ~ 2018-12-09

      本周一至今：2018-12-03，2018-12-04，

      7天前：2018-11-27-->
    </div>
</template>
<style>
  span{margin-right: 10px;}
</style>
<script>
  import {getToday,getWeek,getCurMonth,getCurWeek,getEveryDay,getTargetDay,getLunarCalendar} from '@/util/date-util'

  export default {
      name: "DateTest",
      data() {
          return {
            today:'',
            today1:'',
            nl:'',
            week:'',
            curMonth:'',
            curWeek:'',
            curWeekEveryDay:[],
            lastweek:'',
          }
      },
      created: function () {
        this.init();
      },
      methods: {
        init(){
          this.today=getToday();
          this.today1=getToday('zw');
          this.nl=getLunarCalendar();
          this.week=getWeek();
          this.curMonth=getCurMonth();
          this.curWeek=getCurWeek();
          this.curWeekEveryDay=getEveryDay(getCurWeek().firstDay);
          this.lastweek=getTargetDay('-7');
        }
      }
  }
</script>
